<template>
    <el-container>
        <el-menu default-active="1" class="el-menu-vertical-demo" :collapse="isCollapse">
            <el-menu-item index="1" @click="toMainTab()">
                <i class="el-icon-menu"></i>
                <span slot="title">首页</span>
            </el-menu-item> 
            <el-menu-item index="6" @click="toMenuTab()">
                <i class="el-icon-rank"></i>
                <span slot="title" >导航管理</span>
            </el-menu-item>
            
            <el-menu-item index="7" @click="toScrollTab()">
                <i class="el-icon-picture"></i>
                <span slot="title" >轮播管理</span>
            </el-menu-item>
            
            <el-menu-item index="2" @click="toNewTab()">
                <i class="el-icon-news"></i>
                <span slot="title" >新闻管理</span>
            </el-menu-item>
            <el-menu-item index="3"  @click="toJobTab()">
                <i class="el-icon-view"></i>
                <span slot="title">人才招聘</span>
            </el-menu-item>
             <el-menu-item index="4"  @click="toWordsTab()">
                <i class="el-icon-message"></i>
                <span slot="title">留言管理</span>
            </el-menu-item>
            <el-menu-item index="5">
                <i class="el-icon-question"></i>
                <span slot="title">帮助中心</span>
            </el-menu-item>
        </el-menu>
        <el-container>
            <el-header>
                <i class="fa fa-navicon" aria-hidden="true" @click="changeCollapse"></i>
                <div style="float:right;cursor:pointer;">
                    <el-dropdown trigger="click">
                        <span class="el-dropdown-link">
                            admin<i class="el-icon-caret-bottom el-icon--right"></i>
                        </span>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item class="clearfix">
                            个人中心
                            </el-dropdown-item>
                            <el-dropdown-item class="clearfix">
                            消息
                            </el-dropdown-item>
                            <el-dropdown-item class="clearfix">
                            登出
                            </el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                </div>
            </el-header>
            <transition name="el-fade-in-linear">
            <el-main>
                <router-view></router-view>
            </el-main>
            </transition>
        </el-container>
    </el-container>
</template>
<script>
import 	Menu 		from "@/service/menu-service.js"
const 	_menu 	    = new Menu();
import Mutil 		from  '@/util/mm.js';
const _mm           = new Mutil();
export default {
    name:"manage",
    data :function() {
        return {
            isCollapse: true,
        }
    },
    created(){
    },
    methods:{
        changeCollapse(){
            this.isCollapse=!this.isCollapse;
        },
        toNewTab(){
            this.$router.push({path:'/manage/news'});
        },
        toWordsTab(){
            this.$router.push({path:'/manage/words'});
        },
        toJobTab(){
            this.$router.push({path:'/manage/job'});
        },
        toMainTab(){
            this.$router.push({path:'/manage'});
        },
        toMenuTab(){
            this.$router.push({path:'/manage/architecture'});
        },
        toScrollTab(){
            this.$router.push({path:'/manage/scroll'})
        }
    }
}
</script>
<style>
.el-container{
    height: 100%;
}
.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
}
.el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
}
  
.el-main {
    background-color: #E9EEF3;
    color: #333;
}
  
body > .el-container {
    margin-bottom: 40px;
}
  
.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
    line-height: 260px;
}
  
.el-container:nth-child(7) .el-aside {
    line-height: 320px;
}

.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
}
  

</style>
